#ifndef _thread_cond_h
#define _thread_cond_h

#include <pthread.h>
#include <sys/time.h>

#include "Mutex.h"

namespace ddserver
{
namespace thread 
{

class Condition
{
public:
    Condition();
    ~Condition();

    int wait(Mutex* mutex);
    int timedwait(Mutex* mutex,long milliseconds);
    int signal();
    int broadcast();

protected:
    pthread_cond_t m_cond;
};

}
}

#endif
